<template>
  <div id="vuepress-theme-blog__tags-layout">
    <h3 class="entry-title">{{ $frontmatter.title }}</h3>
    <BlogTags :tags="list"/>
  </div>
</template>
<script>


export default {
  computed: {
    list() {
      return this.$frontmatterKey.list.sort((a, b) => {
        if (/^\d{4}(-|\/)(1[0-2]|0?\d)\1([0-2]\d|\d|30|31)$/.test(a.name)) {
          return new Date(b.name).getTime() - new Date(a.name).getTime()
        } else {
          return b.name - a.name
        }
      })
    }
  },
}
</script>

<style lang="stylus">
.entry-title
  color: #000;
  text-align: center;
  padding-top: 50px;
  margin-bottom: 27px;
  font-weight: bold;

  &::after
    content: "";
    height: 2px;
    width: 50px;
    background: black;
    display: block;
    margin: 20px auto 0;
</style>
